package com.amos.knife4j.dto.form;

import javax.validation.constraints.NotBlank;

import javax.validation.constraints.NotNull;

import com.amos.knife4j.entity.Dic;

/** 
 * <br/>
 * Created by amos on 2021/09/17
 */
public class DicForm{

    /**
	 * 字典值
	 */
	@NotBlank(message = "字典值不能为空")
private String code;

    /**
	 * 字典名称
	 */
	@NotBlank(message = "字典名称不能为空")
private String name;

    /**
	 * 父级字典
	 */
	@NotBlank(message = "父级字典不能为空")
private String parentId;

    /**
	 * 字典状态，是否启用，0：禁用，1：启用
	 */
	@NotBlank(message = "字典状态，是否启用，0：禁用，1：启用不能为空")
private String state;

    /**
	 * 排序
	 */
	@NotNull(message = "排序不能为空")
private Integer sort;



    public Dic  convertDO() {
        Dic info=new Dic();
           info.setCode(this.code);
           info.setName(this.name);
           info.setParentId(this.parentId);
           info.setState(this.state);
           info.setSort(this.sort);
            return info;
	}

    public String getCode() {
		return code;
	}
    public void setCode(String code) {
		this.code = code;
	}
    public String getName() {
		return name;
	}
    public void setName(String name) {
		this.name = name;
	}
    public String getParentId() {
		return parentId;
	}
    public void setParentId(String parentId) {
		this.parentId = parentId;
	}
    public String getState() {
		return state;
	}
    public void setState(String state) {
		this.state = state;
	}
    public Integer getSort() {
		return sort;
	}
    public void setSort(Integer sort) {
		this.sort = sort;
	}
}
